<!DOCTYPE html>
<html lang="en">
<head>
    <title></title>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href="__PUBLIC__/Admin/css/bootstrap.min.css?v={#$Think.config.ADMIN_VERSION_VAL}" />
    <link rel="stylesheet" href="__PUBLIC__/Admin/css/bootstrap-responsive.min.css?v={#$Think.config.ADMIN_VERSION_VAL}" />
    <link rel="stylesheet" href="__PUBLIC__/Admin/css/uniform.css?v={#$Think.config.ADMIN_VERSION_VAL}" />
    <link rel="stylesheet" href="__PUBLIC__/Admin/css/matrix-style2.css?v={#$Think.config.ADMIN_VERSION_VAL}" />
    <link rel="stylesheet" href="__PUBLIC__/Admin/css/matrix-media.css?v={#$Think.config.ADMIN_VERSION_VAL}" />
    <link rel="stylesheet" href="__PUBLIC__/Admin/font-awesome/css/font-awesome.css?v={#$Think.config.ADMIN_VERSION_VAL}"/>
    <link rel="stylesheet" href="__PUBLIC__/Admin/css/changyun.css?v={#$Think.config.ADMIN_VERSION_VAL}" />
    <link href="__PUBLIC__/js/newDatepicker/datepicker.css" rel="stylesheet" />
    <style>
        .table th,.table td{line-height: 20px;text-align: center;border-top: 1px solid #efefef;padding:5px 0 5px 10px;vertical-align: middle;}
        .table thead th {
            vertical-align: bottom;
            line-height: 40px;
        }
    </style>
</head>
<body>
<div id="content">
    <include file="Public/maintop" />
    <div class="container-fluid">
        <div class="row-fluid">
            <div class="span12">
                <div class="widget-box">
                    <div class="cyz-m-tab">
                        <ul class="cyz-m-tab-title">
                            <li class="cyz-m-this" href="javascript:void(0);">资金流水</li>
                        </ul>
                    </div>

                    <div class="widget-content" style="padding:5px;border:0px;">
                        <form action="__ACTION__" method="get">

                            <div class="fr table-button"><button type="submit" class="btn btn-success"><i class="icon-search"></i> 搜索</button></div>
                            <div class="fr table-button">
                                <div class="c-datepicker-date-editor J-datepicker-range">
                                    <i class="c-datepicker-range__icon kxiconfont icon-clock"></i>
                                    <input type="text" style="border: 0px;width:150px;" name="b_time" placeholder="开始日期" class="c-datepicker-data-input" value="{#$this_day_time.b_time}">
                                    <span class="c-datepicker-range-separator">-</span>
                                    <input type="text" style="border: 0px;width:150px;" name="e_time" placeholder="结束日期" class="c-datepicker-data-input" value="{#$this_day_time.e_time}">
                                </div>
                                <input type="text" name="name" placeholder="请输入昵称/手机号码" value="{#$Think.get.name}">
                            </div>
                        </form>
                    </div>

                    <div class="widget-content" style="padding:0px;">
                        <table class="table table-striped">
                            <thead>
                            <tr>
                                <th style="width:80px;">ID</th>
                                <th style="width:250px;">用户信息</th>
                                <th style="width:250px;">金额</th>
                                <th style="width:120px;">当前余额</th>
                                <th style="width:120px;">类型</th>
                                <th style="width:300px;">备注</th>
                                <th style="width:180px;">操作时间</th>
                            </tr>
                            </thead>
                            <tbody>
                            <notempty name="list_data.list_data">
                                <volist name="list_data.list_data" id="article">
                                    <tr>
                                        <td>{#$article.id}</td>
                                        <td style="text-align: left;">
                                            <div rel="pop" style="display: flex">
                                                <img style="width: 40px;height: 40px;border-radius: 50%;border:1px solid #efefef;" src="{#$article.user_headimg}">
                                                <span style="display: flex;flex-direction: column;justify-content: center;align-items: flex-start;padding-left: 5px">
								   <span class="nickname">
									   {#$article.user_nickname}<br>
									   手机号码：{#$article.user_true_phone}<br>
								   </span>
							</span>
                                            </div>
                                        </td>
                                        <td style="text-align: center;">
                                            {#$article.account_money}
                                        </td>
                                        <td>{#$article.account_balance}</td>
                                        <td>
                                            <eq name="article.inout_type" value="1">
                                                <span class="btn btn-success btn-mini">增加</span>
                                            </eq>
                                            <eq name="article.inout_type" value="2">
                                                <span class="btn btn-danger btn-mini">减少</span>
                                            </eq>
                                        </td>
                                        <td>
                                            {#$article.account_info}
                                        </td>
                                        <td>{#$article.add_time|time_format}</td>
                                    </tr>
                                </volist>
                                <else/>
                                <td colspan="10" class="text-center"> 暂时还没有信息! </td>
                            </notempty>
                            </tbody>
                        </table>
                        <div id="hongxin_page_view">{#$list_data._page}</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script src="__JS__/jquery.min.js"></script>
<script src="__JS__/jquery.ui.custom.js"></script>
<script src="__JS__/bootstrap.min.js"></script>
<script src="__JS__/jquery.uniform.js"></script>
<script src="__JS__/select2.min.js"></script>
<script src="__JS__/matrix.js"></script>
<script src="__JS__/matrix.tables.js"></script>
<script src="__PUBLIC__/js/layer/layer.js"></script>
<script src="__PUBLIC__/Admin/js/common.js"></script>
<script src="__PUBLIC__/js/newDatepicker/moment.min.js"></script>
<script src="__PUBLIC__/js/newDatepicker/datepicker.all.js"></script>
<script type="text/javascript">
    $(function(){
        var DATAPICKERAPI = {
            // 默认input显示当前月,自己获取后填充
            activeMonthRange: function () {
                return {
                    begin: moment().set({ 'date': 1, 'hour': 0, 'minute': 0, 'second': 0 }).format('YYYY-MM-DD HH:mm:ss'),
                    end: moment().set({ 'hour': 23, 'minute': 59, 'second': 59 }).format('YYYY-MM-DD HH:mm:ss')
                }
            },
            shortcutMonth: function () {
                // 当月
                var nowDay = moment().get('date');
                var prevMonthFirstDay = moment().subtract(1, 'months').set({ 'date': 1 });
                var prevMonthDay = moment().diff(prevMonthFirstDay, 'days');
                return {
                    now: '-' + nowDay + ',0',
                    prev: '-' + prevMonthDay + ',-' + nowDay
                }
            }
        };
        //十分秒年月日范围，包含最大最小值
        $('.J-datepicker-range').datePicker({
            hasShortcut: true,
            min: '2016-01-01 00:00:00',
            max: '2050-01-21 23:59:59',
            isRange: true,
            shortcutOptions: [{
                name: '今天',
                day: '0,0',
                time:'00:00:00,'
            },{
                name: '昨天',
                day: '-1,-1',
                time: '00:00:00,23:59:59'
            },{
                name: '前两天',
                day: '-2,-1',
                time: '00:00:00,23:59:59'
            },{
                name: '前三天',
                day: '-3,-1',
                time: '00:00:00,23:59:59'
            },{
                name: '最近一周',
                day: '-7,0',
                time:'00:00:00,'
            }, {
                name: '最近一个月',
                day: '-30,0',
                time: '00:00:00,'
            }, {
                name: '最近三个月',
                day: '-90, 0',
                time: '00:00:00,'
            }],
            hide: function () {
                console.info(this.$input.eq(0).val(), this.$input.eq(1).val())
            }
        });
    });
</script>
<script>
    function dodel(jump_url){
        layer.confirm('确定要删除吗', {
            title:'提示',
            icon: 0,
            btn: ['确定','取消'] //按钮
        }, function(e){
            window.location.href = jump_url;
            layer.close(e);
        }, function(e){
            layer.close(e);
        });
    }

    function changstatus(field,status,aid,e){
        var loadi = null;
        loadi = layer.load(2);
        $.ajax({
            type: "GET",
            url: "__CONTROLLER__/setstatus",
            data:{c_field:field,c_value:status,id:aid},
            dataType: "html",
            success: function(data){
                layer.close(loadi);
                $(e).parent("td").html(data);
            },
            error: function(XMLHttpRequest, textStatus, errorThrown){

            }
        });
    }
    function bindUserYewuyuan(url) {
        layer.open({
            type : 2,
            offset: '100px',
            title : '设为运营人员',
            area : ['500px', '400px'],
            content:url,
            success: function(layero, index){

            }
        });
    }
    function cacelUserYewuyuan(user_id,title) {
        layer.confirm('确定' + title +'吗', {
            title:'提示',
            icon: 0,
            btn: ['确定','取消'] //按钮
        }, function(e){
            layer.close(e);
            var loadingIndex = layer.load(2);
            $.ajax({
                type:"GET",
                data:{user_id:user_id,_:Date.now()},
                dataType:"json",
                url:"{#:U('cacelUserType')}",
                success:function(data){
                    layer.close(loadingIndex);
                    if(data.status == 1){
                        layer.alert(data.msg,{icon:1},function(){
                            window.location.reload();
                        });
                    }else{
                        layer.alert(data.msg,{icon:0});
                    }
                }
            })
        }, function(e){
            layer.close(e);
        });
    }
</script>
</body>
</html>
